<?php

$this->breadcrumbs = array(
	$model->label(2) => array('index'),
	Yii::t('app', 'Manage'),
);

$this->menu = array(
		array('label'=>Yii::t('app', 'List') . ' ' . $model->label(2), 'url'=>array('index')),
		array('label'=>Yii::t('app', 'Create') . ' ' . $model->label(), 'url'=>array('create')),
	);

//Yii::app()->clientScript->registerScript('search', "
//$('.search-button').click(function(){
//	$('.search-form').toggle();
//	return false;
//});
//$('.search-form form').submit(function(){
//	$.fn.yiiGridView.update('enquary-grid', {
//		data: $(this).serialize()
//	});
//	return false;
//});
//");
?>

<h1><?php echo Yii::t('app', 'Manage') . ' ' . GxHtml::encode($model->label(2)); ?></h1>

<p>
You may optionally enter a comparison operator (&lt;, &lt;=, &gt;, &gt;=, &lt;&gt; or =) at the beginning of each of your search values to specify how the comparison should be done.
</p>

<?php echo GxHtml::link(Yii::t('app', 'Advanced Search'), '#', array('class' => 'search-button')); ?>
<div class="search-form">
<?php 
//$this->renderPartial('_search', array(
//	'model' => $model,
//));
?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id' => 'enquary-grid',
	'dataProvider' => $model->search(),
	'filter' => $model,
	'columns' => array(
		'id',
		'category',
		'coustmer_name',
		'coustmer_id',
		'alternate_no',
		'installation_address',
      array( 'type'=>'raw', 'value'=>'CHtml::link(\'Assign\', 
          array("enquary/assign", "id"=>$data->id))', 'header'=>'Assign'),		/*
		'city',
		'landmark',
		'zone',
		'product_type',
		'state',
		'pin_code',
		'los_no',
		'plan_name',
		'activation_date',
		'case_type',
		'address_confirmation',
		'subsriber_confirmation',
		'av_result',
		'av_code',
		'applied_for_connection',
		'name_of_person_meet',
		'relationship',
		'remarks',
		'get_location',
		'resident',
		'income',
		'organization',
		'occupation',
		'company',
		'agri_land',
		'distance_from_branch',
		'vehicle',
		'gate_colour',
		'wall_colour',
		'person_image',
		'poi_mage',
		'poa_mage',
		'signature',
		*/
		array(
			'class' => 'CButtonColumn',
		),
	),
)); ?>